{% extends "common/layout.html" %}
{% block content %}
<div class="row">
     <div class="col-lg-12">
         排序： <a href="{{ buildUrl('/movie?order=last') }}" class="btn btn-link">最新</a>
          <a href="{{ buildUrl('/movie?order=hot') }}" class="btn btn-link">热门</a>
     </div>
</div>
<div class="row" style="margin:10px 0 ;">
    {% if data %}
        {% for item in data %}
            <div class="col-md-3">
                <a  class="thumbnail" href="{{ '%s?id=%s' | format( buildUrl('/info'),item.id) }}">
                    <img style="width: 100%;height: 260px; " src="{{ item.cover_pic | safe }}" alt="封面图">
                    <div class="caption">
                        <h3 style="overflow: hidden;text-overflow: ellipsis;display:-webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp:1;">
                            {{ item.name | safe }}</h3>
                        <p>{{ item.source | safe }} | {{ item.updated_time.strftime("%Y-%m-%d") | safe }}</p>
                    </div>
                </a>
            </div>
        {% endfor %}
    {% endif %}
</div>
{% include "common/pagenation.html" %}
{% endblock %}